package com.gitee.xmhzzz.mars.code.mqtt.broker.start;


import com.gitee.xmhzzz.mars.code.mqtt.broker.service.MqttBroker;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class MqttBrokerStart implements CommandLineRunner {


    @Override
    public void run(String... args) throws InterruptedException {
        int port = 1883; // 默认端口
        new MqttBroker(port).start();

    }

}